﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kopytko.BoardGame
{
    public class BoardPosition
    {
        public byte X { get; set; }
        public byte Y { get; set; }



        public BoardPosition(int x, int y)
        {
            X = (byte)x;
            Y = (byte)y;
        }

        // Na podstawie nr pol nr od 1
        public BoardPosition(short position)
        {
            X = (byte)(position%8);
            if (X == 0)
            {
                X = (byte) 7;
            }
            else
            {
                X--;
            }

            Y = (byte) (((int) position)/8);

            if (position % 8 == 0)
            {
               // Y--;
            }
        }
    }
}
